import { createRouter, createWebHistory } from 'vue-router'
/*引入主页面*/
import HomeView from "@/views/Home/HomeView.vue";

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    /*设置默认登陆路由*/
    redirect:'/statisticalReport',
    children:[
        {path: '/statisticalReport', name:'statisticalReport', component:()=>import('../views/StatisticalReport/StatisticalReport.vue')},
        {path: '/intakePlatform', name:'intakePlatform', component:()=>import('../views/IntakePlatform/IntakePlatform.vue')},
        {path: '/addRegistration', name:'addRegistration', component:()=>import('../views/RegistrationPlatform/AddRegistration.vue')},
        {path: '/doctorScheduling', name:'doctorScheduling', component:()=>import('../views/RegistrationPlatform/DoctorScheduling.vue')},
        {path: '/intakePatient', name:'intakePatient', component:()=>import('../views/PatientManage/IntakePatient.vue')},
        {path: '/uploadResult', name:'uploadResult', component:()=>import('../views/PatientManage/UploadResult.vue')},
        {path: '/medicationInfo', name:'medicationInfo', component:()=>import('@/views/MedicineManage/MedicationInfo.vue')},
        {path: '/getMedicine', name:'getMedicine', component:()=>import('../views/MedicineManage/GetMedicine.vue')},
        {path: '/manageMedicine', name:'manageMedicine', component:()=>import('@/views/MedicineManage/ManageMedicine.vue')},
        {path: '/chargeManage', name:'chargeManage', component:()=>import('@/views/ChargeManage/ChargeManage.vue')},
        {path: '/employeeManage', name:'employeeManage', component:()=>import('@/views/EmployeeManage/EmployeeManage.vue')},
        {path: '/roleManage', name:'roleManage', component:()=>import('@/views/EmployeeManage/RoleManage.vue')},
        {path: '/clinicInfo', name:'clinicInfo', component:()=>import('@/views/SystemSettings/ClinicInfo.vue')},
        {path: '/dictionary', name:'dictionary', component:()=>import('@/views/SystemSettings/Dictionary.vue')},
        {path: '/logs', name:'logs', component:()=>import('../views/SystemSettings/Logs.vue')}
    ]
  },
  {
    path:'/login',
    name:'login',
    component:()=>import('../views/Login/LoginView.vue')
  }

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
